tidy/Minor tidying up of code