serv code and makefiles fixing