Refactored the models (renamed the ids to make the relations more clear).

Added a db conext initializer.
The database has to be rebuilded.