Fixes for code quality issues