Fixed an infinite recursion derp and started testing some events.
Cleaned up the code. Replaced tabs with spaces.
Did some more work: custom messages and extension action.