minor code changes

uses type hinting in one case and test.php uses default endpoint rather
than local now