Server base

Tried to be mostly C compatible, dont eat me :D.