Reimplemented YEntity, no weird type errors now; fixed all available tests