Design of base components + Clock

* Code improvement
* Clock implementation
* Tests
* License headers
Use pattern matching and extractors instead of msg.frequency and msg.report?