Refactoring. Factor out the DSL helper that erb in the notes can call
into. Minor cleanup and fixes.

This fixes potential naming/scoping issues with allowing the dsl to call
directly into the parser.