Added statistics functionality, also export DB to SDcard