change DB structure and fix classes