Add support for basic triggers

WIP