I would also split `handleEvent` object into two one containing history stuff and other containing bookmarks stuff instead of keeping arrays in addition.