simplify code with use of dbctrl

Signed-off-by: Mattias Andrée <maandree@operamail.com>