Minor updates and code tidying