Refactored into functions. Added accepting connections, and echoing 'Hello World' to client.