Refactored tests and runner.