Major update to version 2.0 with events/trigger, bug fixes and cleanup