Cleaning up

Signed-off-by: Dsyko <dsykora@gmail.com>
Fixing initial logging to DB

Signed-off-by: Dsyko <dsykora@gmail.com>