Major refactoring of some things (mainly Phox stuff), reduced dependancies, cleaned up unnecessary Phox inline preprocessor things. The main function has been tidied up, and AStyle format has been applied to the sources.