Added new math functions and modified code to use them