Added handshake and moved Server.hs into Main.hs