Added server code. Is not fully functioning, but has a lot of aspects implemented.