Advanced logic skeleton.
Lock based implementation with counters.
Round max time counter.
Code cleaning.