Code Quality improvements