Billing api updated

Merged and cleaned up a few conflicts to bring the billing-api branch back in sync with master