pull irc dependency out of connection

just pass in the serialize/deserialize functions. Also add some documentation
documentation