Maint: Refactor trigger factory module

Refactor trigger factory module to export an instance rather than an
object and avoid the `this` and `new` keywords. This module doesn't
really require anything to be bound to a specific context.