Added `before_init` and `after_init` callbacks