Added db and updated a little bit of client_handler