Small refactoring changes.
Fixed bug on OSX running Java 7 hanging on opening a JFileChooser.