Refactor run-test

Move run to own module, and cleanup