Moved window from main to its own class