No more sourcemaps
Dispatch an event on activate/deactivate
Minor rewrite, simplified everything