refactoring towards dynamic mediawiki template inclusion