Make several changes to fix pointer assignments, echo to client instead of server, and command sanity checks