Update code for new LEM format.