further code tidies