Created a new logging method and a new way to handle error
Changed the way the window is being created
Added a few methods to control the window