Init code added

Added code for th init method. Window also works.
Need to continue testing + add code for event loop