added templates. added markdown preprocessing