Move model to controller