New main window with more input. Fixed bugs.