Split api module into an api package