Cleaned and Clock Code