Move common code into Common project
Fix typo with SM dll
Merge pull request #2559 from ogail/s2

Move common code into Common project