Fixed history and navigation stuff, and removed console logging.