Adding templates and main class.