API Merge - Cleaned code acc to comments