Some Cleanup in PropertiesDialog, and unit test done #7