Update to new db interface and bump version to 0.5.1