small mods and tidy up