Seth MacFarlane has improved as a film-maker since his early efforts. While "Ted" was entertaining but had quite a few problems and relied heavily on sophomoric humor. That's not to say that his newest film isn't sophomoric, but it is a very well put together film. Unlike many of the genre films these days, this one has a lot grounded while also being ridiculous.
As a comedy, there's a lot of weight on the film to make people laugh while also keeping the audience's relation. It's even more difficult considering this one is set in the West. Luckily Seth MacFarlane's character is very grounded in human emotions and disinterest in the time period he lives in. This is something that many people can relate to and can care about. When a film convinces it's audience to care, it makes the laughs easier to obtain.
On another hand, some of the jokes do fall flat. There are a couple jokes that really come off as uncharacteristic and out of place. This does somewhat confuse the overall spirit of the characters. One can't let this take away from something that's overall good.