Added headers to service, created helper functions for testing, implemen...

Added headers and cleaned up code. Implemented mozAlarm for testing.