Moved ticker to separate module, so client and server can share the code.