Leah Franchetti welcomes the election of Richard Leonard as Scottish Labour leader and looks at a few of his initial challenges.

Leadership contests rarely show political parties in a good light and our bruising contest has been no exception. Friendships have been tested, insults hurled on both sides, and pride wounded. It has been a difficult period for the party I love.

However, this marathon race is over and the result was decisive. Richard Leonard will be our leader for years to come.

I am in no doubt that Richard, who I backed after much soul-searching, has the skills to unite our party and bring us together under a progressive agenda for change.

But the last two months were just not about resolving an internal leadership vacancy. The contest was also about selecting our party’s candidate to be First Minister.

Some of Richard’s challenges are immediate, such as appointing a shadow cabinet of all the talents. There will inevitably be speculation about Neil Findlay and Monica Lennon getting promotions but let’s not forget the undoubted abilities of Anas and the MSPs who backed him.

Appointing a first-class backroom team is also essential. Even Jeremy Corbyn’s most impassioned supporters would agree that Jeremy could have made some better staffing decisions in his early days.

Richard should not rush into appointments, but we need people who take the professional side of politics as seriously as the SNP has done for over a decade. Media relations, strategy and messaging are areas we have to get right.

On policy, our challenge is the same as it has been since the day our party was formed. We must build a coalition of working and middle class voters who are inspired by our message of change.

For instance, at the next Holyrood election the trade unions will back Labour like never before. This will give us a huge advantage in workplaces across Scotland. However, we also need to have a message for the aspiring entrepreneurs who are buzzing with ideas for new businesses.

On tax, we will call for progressive increases, but we also need to be clear on the ways in which the money raised will improve lives.

We should also recognise that the autonomy devolved to Scottish Labour allows us to come up with our own positions on reserved areas. There is nothing to stop us from developing a distinctive policy on Brexit and fighting our corner within the UK party.

I know some of my friends are feeling fragile after a brutal contest, but this is an exciting time to be in Scottish Labour and with a united party we can enter government in Edinburgh and London.