Adding the code for creating templates and workspaces.