Merging @bewest's wip/api-modules branch