Remove unnecessary timeouts
Rearrange code