Bug fixes
Added documentation