Added coverage
Refactor DB eventes
Update Travis configuration