added missing templates and do minor fixes