* Add support for stats & code cleanup * Add more stats * Move code into own object * Add to API * Update API * Add error handling * fix lint * fix block io