more code tidying.