Changes:
- Added error handling
- Increased test coverage
- Added javadoc
- Code cleaning