ad support for hashchange and few other tidy ups #9