clean up usage of hashchange events