AS MPs head off to their summer palaces, it seems the leader who has the sunniest smile on his face is David William Donald Cameron.

This prospect would have seemed unlikely at the start of the year when the Tory Eurosceptics were in full voice despite the Prime Minister's strategic cave-in on an in-out referendum on Britain's membership of the EU. Indeed, things have been going the Tory leader's way on a number of fronts, so much so he has put back his reshuffle to the autumn.

Tory James Wharton's private members' bill on having a referendum by 2017 galvanised the Conservatives, who had an unusual but highly enjoyable Friday when they saw the bill pass its first parliamentary hurdle by 304 votes to nil. Despite the fact it is not likely to go much further, Mr Cameron seems to have successfully mopped the Eurosceptic brow – for now.

The UKIP threat seems to be receding in the polls – it was as high as 20% but is down to just 7% – yet is likely to reach its high point next spring in the Euro elections, after which support for the new party of protest is likely to fall back again as voters consider voting in a new government.

As for gay marriage, apart from the expected wail of disapproval from the Tory traditionalists, the bill went through parliament pretty smoothly and became law in England and Wales this week, meaning it is over to Holyrood to follow suit.

While Mr Cameron and his loyal lieutenants have been boasting about how well it is going on the Scottish independence front, the issue which has buoyed the Tories the most is the slowly recovering economy.

This is enabling Cameron to seize the political initiative more and more.

All of which is leaving Ed Miliband with a problem. Two weeks ago, the Labour leader had a shocking Commons Question Time when the Falkirk fiasco broke and Mr Cameron used the powerful political phrase against his opposite number, which will become a mantra up to the election – "weak, weak, weak".

The Tory leader knows much of the public has a question mark over Mr Miliband as a potential prime minister and the more he can reinforce those doubts, the more chance he has of staying in No 10.

While Conservative tails are up, Labour ones are down. On matters like spending and welfare, the two Eds appear to be floundering, accepting the Tory settlement on spending and welfare post 2015.

An upbeat George Osborne summed it up: successful opposition parties move on to the middle ground but successful governments change the middle ground.

While Mr Miliband did well on the issue of Falkirk by trying to turn a disaster into an opportunity, the internal changes to Labour funding are technical and might not be fully appreciated by the punters.

Last year, the Labour leader used his party conference to seal the deal with his own party; this year, he has to use the autumn conference to convince the public he can lead the country.

Mr Miliband might be helped by the looming phone hacking court case.

But he cannot rely on external events to propel him to power. He must shape them by coming up with a coherent strategy held together by credible policies. Given much of next year will be taken up by you know what, Mr Miliband might find he has less time to turn things round.