Add stats tests and move stats to models package