Fix/cleanup waitForSelector