minor mods and cleanup