Separate Core API from implementation

This change introduces a separate API module for the core services.