Simplify reference implementation.