Refactor template markers

Fix problem with post message