Changed updating the stage into a draw method which is called with the browser's animation frame.