Continuous energies support added to xmi_main

Untested, but no real problems expected...