Quote a lot of progress on HorizonAPI.php

Rolling corresponding changes to HorizonXMLAPI.php back.