More consistent formatting and tidying-up