Code quality cleanup