Agent's 'generate_contract.php' improvements