Minor fixes and tidying.