Cleaned up api and broke out additional modules.