Moved code from EntityHandler to new UpdateEntity object