Merge code quality improvements