removed many old functions that are no longer needed
moved lookup_client function into JSONAPI