Fix clock namespace issue and remove unused code