Intitial updating commit. DOES NOT YET BUILD.
Rewriting unit tests and refactoring for TP3