More database restructuring