Tidying up source code slightly