Make removeOps unexported.
Fix tests opening ports with invalid protocols.