make a space optional in # template

Fixes #38, Closes #82
fix: support html entities in templates

Fixes #32
Closes #80
documents and reorganizes the compiler code

Closes #83