DDF-578: Added javadoc & reformatted code