Added an object-based interface to the PIR sensor.
Added comments.