Encodes values.
Removes unused method.