Added callbacks and a clock