Added logging & database class