refactoring out some of my database cruft.