some bugfixes and hardening
added the ability to save data in LocalStorage