code cleanup on server.js and bug fix on sockets. BASE. Now going to ignore minor socket problems until after MVP is done