Moved isEOD to Core

applied commy's optimization