Balance column and rescan tweaks

Changes made mostly to handle shutting down client
while rescan is in progress. Also some performance tweaks
and comment changes.