Removed unused code, started expanding documentation