Moved and revised FPS calc code, fixed issues