see jira tickets match-24, match-25

cleaning up code, javadoc,