Cleaned up, and added movement on hashchange event