Implementing more intelligent wait system.