Move API code to main project.

This will fix coverage reporting, packaging, and documentation.