Removed extra dependencies, added support for default enter/leave handlers