Added new module state change events.
Remove rogue legacy.
Attempt at fixing #1424
Merge pull request #1435 from drak/events

Adding new events