Add stat library.
Add caching to c_backend.
update
Merge branches 'rjpower-master' and 'dev' into dev