Moved all function classes out to seperate classes. One calc bug fix. Some clean up. More should be done in terms of clean up