Initial implementation of clocking
Move command line processing into seperate module