Get rid of many uses of target_base.

Also fix some uses of reserved names and other
naming issues.

Auditors: pl