Remove EntityWriter, backport #372