Moved stats stuff here from words-backend.