Added math folder. Updated couple of functions to be excplicit inline to
reduce clutter.