Added update() and draw() functions for game loop