Initial implementation of LDM/STM. Not tested