Added line ending and altered debug message
Added further socket code

Created an address structure which uses the relevant information (e.g.
port number) and subsequently used this with the socket descriptor and
bind(). Some documentation and minor fixes done too