Correcting some code quality issues