Made changes to Python3 functions. Separated math functions from non-math functions