Bumped libraries to the new version, tidied the CMake files, now compiles on linux, fixed several tests, tidied the codebase by deleting the dead branches.