refine the directory group make it more clear and set null when a view is removed