Update FPS counter, use jQuery show/hide, some refactoring