Clock code cleaned. Code compile with BBSim