Added waitForMouseDown and so on