Add missing javadoc
Move the debug boolean to CausticUtil and add a logger
Use logger

Also, cleanup