Added pre- and post-render events

Should give more control if the need arise