updated EMS module (needs some more updating)

Signed-off-by: Vadim A. Misbakh-Soloviov <mva@mva.name>