Bugfixes in FPS class.

Current FPS is now calculated correctly. Removed a memory leak.