Base

Base of server, mostly from msdn