Renamed functions, moved add quote function outside to make it work in Drupal and CKAN