Fix unnecessary non-const pointer.
Fix conversion operator in terms of handle semantics.
Use Database class, by simple one-by-one translation.