Enhanced JavaDoc
Refactored some code