Fixed parsing of url hash
Added 'beforeunload' message when not saved
Refactored state proxy object