simplifying conditional logic in templates + fixed it so that it takes namespace into account
prevent admin group from being deleted, closes #530