refactoring index.htm
resetAppState() now works correctly with multiple save positions