Use model attributes correctly, and add input to change name