With additional API calls written and some SQL queries optimized