Added framerate detection