Minor code cleanup.
WIP Testing and implementing value expansion.