Added FPS counter, bug fixes