Add stats command

And tests