Caching, fixing divisions sort of, etc. Needs more work