Move functions to a new class, get stats