Added templates and fixed course adding bugs.