Fixed variable references.
Build expanded.