Fixed exception while leaving activity.
Added FPS choice through menu.
Code Refactoring.