Updated model and controller classes