Organized existing math code (thus making space for future additions)