Add JavaDoc and ReadMe. Refactoring