implemented HTML5 localStorage and did some refactoring