added some dependency handling between service and api wrapper