Cleaned up some FileChooser code, and added a new method showDialog()