Re-arranging some math functions. (not finished).