- Refactored some methods, added javadoc, minor improvements