Moved SQ and MD templates internals in the plugin