I previously held a position at company X. I left because my spouse got a job offer in another location, but also my boss didn't like me very much and didn't let me do my job properly and he hadn't planned to renew my contract. To be honest I didn't like my boss either -- he was a real pain.
In any case, my old boss has left the company, and we are planning to return to our previous home for personal reasons and I'm looking for a new position. In my job search, I found that my old job at company X has just recently opened up, and I'm thinking of reapplying. My work experience in the meantime has made me a better applicant for the position than I was previously, and of course I have the prior experience from actually doing the job in the past. So I think I should be a great candidate for this position.
The main issue I have is, how should I go about applying for this job? It clearly requires a more specialized cover letter than your average job posting. I want to show them that I really loved this position, and that I am excited to rejoin the team. But I also need to explain what I've been up to in the interim in a way that is coherent and doesn't make me seem like a flake. Any advice?