Clean up some schoolboy errors with comments and naming