Added the rest of the DeviceEventListener code
New test cases