This entire project was coded in C following the Events and Services framework.
The code is available on BitBucket.