copy cleanup
code cleanup
removed double update(entity) call
calling save function on EntityRepository