Added onPre/PostNext hooks, fixed dom error where a hook was overwriting the step var