Improvements to javadoc comments, unit tests, decode/encode methods, and formatting.