Simplified type classes for line I/O and sockets