Organizing our code into a game loop; creating the render function