Added some callbacks.

- It now logs to sen.se and cosm.
- Adds data to RRD graph.
Refactor for OO.

- Refactored a bit to help with polymorfism.