Added FPS calculation and frame count.