Merged changes into master.
Merge remote-tracking branch 'origin/master' into NewDatabase
Moved the working fence code over to the ActionSelector in order to differentiate between entry and exit of a fence.  Code is currently untested.