Working code for a simple server that takes message recieved on given port and prints it out. The code is unstructured and all in the main function
Refactored code. Has basically same funtionality as before.