Added statistic backend

Statistics won't be logged yet, but there's a framework in place for that.