Draft: code organisation for old ims module.