Re-implement clock as a service

This is probably wrong, and it breaks the tests, but I'm learning here!