Merge pull request #6 from lukepatrick/master

cleanup trigger code