DJR:Made controller a class