XHGui changes to get it working on Drupal 7