Change Objects.deepEquals to Objects.equals and fix warnings