Moved some more files around and cleaned up the math library.