Further minor code tidying