Cleanup and refactor in preparation for the verbatim project