Optimalizations and FPS counter