Tidy up code for naming consistency