-Only show cdFrame if dur > 1 to avoid visual pollution

-Changing the way that the code is structred and
 fixing cd < 0 problem.