Refactored function names to on, off, trigger.

Tests added and updated: jasmine tests added.