remove socket.io and some cleanup and add REST