Cleaned up socket monitor code, tests, and man page