Fixed button. Removed "Recieved:". Factored out functions for socket