Remove unused imports
Move some more waiting code into peachtree.wait