Refactored api index file