added model di and some controller to model refactoring