Cleanup math symbols

Round to int, fix direction, use references and fix side bearings.