Improved docs
Bug fixes
Added more tests