Added sleep to update loop so that it's going at about the target framerate