Creating the window before running the application fixed any issues with no main windows, now cleaning up and formatting for better separation