federation.php now correctly queries other websites for their purpose. Final testing is needed before submitting.