various cleanups and one fix after merge