Extract some basic code from yardstick