Easier MainPlugins, added constant TEMPLATE_DIR