Switch models structure to entities+type

(+ refactor models module, move to own directory and move generic model
classes to the `base` module)