More database updates, code clean-up.