Move object creation to controller