remove unused ECloseRow and EFirst; fix warnings