Remove walk_metadata, it was nuked in the merge

Auditors: benjy
Get rid of many uses of target_base.

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

Auditors: pl