Move test helpers into their own module.
Abstract away more UI functions.