Changed freebase query functions to use Drupal functions
Merged wih master. Contains theme and freebase query changes