Changed freebase query functions to use Drupal functions