Add beforeRender hook
Modify order of methods