Added template system

Added a template system structure. It is not done yet.