Refactor: Consolidated iapi and api functions to single entry point