Fixed terminator not working as expected. Removed code for receiving terminator from client, instead assume </xml> terminator. Changed results from list to dictionary (as to be able to list results with strings). Added loop to client to make reconnecting easier.