changed error messages
fixed validation to check all templates assigned to the unassigned site
fixed query for orphan templates