Revert "Working database code."

This reverts commit 08d5b39bc85e1e3d9247c2e72b42daceb122b0c3, reversing
changes made to 1ea0c6a0f968a03cdc3eba53e6b343dd249ab068.