Moved template system to a separate Class