Minor refactoring
Use another approach to add a hook on view creation