[READY] Server issues

Fixes issues with all the data being sent down the socket at once and a number of other issues.