Added ability to handle wait conditions and wait condition handles.