common modules: tidy up to meet PEP8 better