Removal of isValid() and movement of key.remove() code in ConnectionManager.java.
Method movement (no semantic changes intended).