Added TCPListener base in a new package, completed some buffer
extraction functions, fixed a few bugs and typos