Added onhashchange event and fixed typos and stuff