Major reorg. Removed WaitPixelColor dep
Code cleanup