Replace drupal calls with CMS-independent calls