by Benjamin. Added CFF agent profile validation, update and bugs.