Amperstyle improvements and folding GotoHistoryIndex into it's own function.