Fixed unbounded memory allocation in local storage
Added support for events
Merge branch 'pr81'
update tests
fix undefined var, add test
Merge branch 'issue80'