more cleanup

Taking some things from 'clean-up-scaffold' branch that we actually want (and we can otherwise delete that branch).