add new model classes

Use namespaces and prepare database restructuring with new model
classes.