Refactor models and controllers tests