CDAP-1047 style changes and add javadoc.