Agent and contact changes
Fixed tests