publish cleans up a href tags, better errors
cleanup traces and compiled