First commit of SDM code. ASM.JS compiles, bbut it needs testing...