Cleaning up math