extracted Socket class from Server
simplified buffer class
fixed buffer shift functions