Maybe got wait for buttons?

* Other tests are now failing, must investigate further.
* Added common functions