Added Events for statistics and split up DB save function