major refactoring of paste model
tcpsrv updated for the new model