Mostly database fixes.