added tests for main window
added method comments