Make heistInit in the Compiled module serve compiled templates

Also did general cleanup and code reorganization.