Improve structure

- Add javadoc comments
- Print through separate method