Added FPS counter and performance optimizations