Made corrections to timing and removed unnecessary code.