Tweaks in DB class

- Fix inconsistent property names
- Refine query() method