Implemented run and teardown.