Several minor changes, mostly to improve naming consistency