add some associations between the models, fix search (as much as possible), and update the tasks to respect the associations