Introduced Clock interface and fixed all unit tests