Improved the FrameRater class