Fixes #55: Improve db efficiency by not using db.