Clean-up

Cleaning up old comments and code.
separated tcp socket usage and command processing (allows for
libwebsockets usage next to tcp sockets)