Firstly I swaddled completely until about 3 months, then swaddled her, starting just under the armpits so she learned to sleep with free arms. then I put her in a grobag around 6 months. Yes,she flailed about but isn't that the way babies get themselves to sleep? They mess around, cry a bit, fidget constantly, and look like they'll NEVER go to sleep, but then they do.
OK, if my dd had cried on and on, then I would have comforted her, but NEVER pick her up! She would never have learned that bedtime is time to get herself to sleep.
If you start picking up and puttng down, then that sets the pattern, and you could end up doing that for a long long time....
Anyway that's what I did. I know that all babies find their own way, and parents have their own methods, but I hope that gives you food for thought.
And one more thing, is your ds room really dark? Black out blind etc? I found that helps sleep enormously.