Cleaned up a little more database stuff (old code).