Merge pull request #1 from alexbennett/master

Update to latest.
Added a few extra events to check activity on, more accurate certainty as well.
Reformatted code.
Merge pull request #3 from HmmmQuestionMark/master

All the fixes I forgot to send to you.