CRM-13067 code tidy up - remove repetitive code
CRM-13067 code tidy up - move import specific function to import class
use new exception wrapper on api