Generic code cleanup
Backend copied from ticketboard project
Create: db_wrapper