Fixed off() for plain objects.
Added tests for events on plain objects