More messing around with database stuff.