Wrote all modules, updated documentation and build files, added tests.