Added window and changed game api structure