Added some comments and a new method that returns stats as a dictionary
Merge github.com:catami/catami