code quality fixups