Add printast and untypeast to help with debugging
Add printdoctree for debugging
Implement features used in Core