Moved main server loop into its own function
Fixed errors in address generation
first dirty socket setup
Added support for IPv6 peer addresses
Initial IPv6 support

Needs testing and maybe cleanup