Added a conditional to process smart events with the smart logic
Refactored the database to use a base class that provides common
functions
Implemented PersonLocationDAO and detection of person location change.