Updated documentation

Also moved all library dependent stuff into libraries and updated CMake accordingly