Kjq/cleanup1

This is a set of changes I hope to merge into cheddar's branch -- but it could also wait until after his branch. It'll be clean either way.