Adding the refex driver program. Working version, needs some edit though.