Added closeWindow()-method to MainWindowTool
added JUnit test coverage (77.2%)
added several test cases
fixed minor bugs