Refactor internal implementation, review of events; change engine in package.json