Some code quality edits