Refactor API http handlers to prepare for versioning.
Merge pull request #146 from vmarmol/subcontainers

Refactor API http handlers to prepare for versioning.