Refactoring of Chartoon_Template_Plugin