Fixing sample file dialog initialization and other things - Alex