Continued refactoring for API addition