Feature/log events

Dan, if you don't have time to do all, please try and merge at least the 1st 2 commits (they involve no migration)..