Need to come up with better framerate control.