Refactor.
Missed db close.
Missed db close.