Fix all of the code so that it compiles with JBrick. The documents need to be changed to reflect the new function signatures.