Code cleanup.

Remove code replication in table-create/clear routines, change routine names,
cleanup comments and newlines, fix indentation, etc.

Change-Id: I3c0ff4db91cb41f625abcdb9fd49bc73699a34f1
Merge "Code cleanup."