API and STATS improvements