Better coding standards. Removing need for lib math.
Code cleanups after talking with Nick