Added a math library, and rewrote some rendering code