simplified version of the template postmessage calls
cleaning up postmessage in the templates
Merge branch 'feature-cleanpostmessage' into dev