Readded triggers, using github version of knex, cleaned up