Added a module to hold the state of things. There are now different events for the motion sensors, so there's no longer a need to use the DelayedAction class.