Added vertical window sync. Added game loop.