log refactoring and javadoc additions