Changed a lot of stuff. Didn't bother breaking it into multiple commits. math.py works.