move SML implementation into separate directory