Rewrite of the database system used in WTF.