I think you did the right thing.
You tried to make things better, but they never were going to get better because the guy wouldn't do anything to change his messy ways.

Work is work... we all know that and life is not always a bowl of cherries, but you shouldn't have to suffer everyday at your job.
I did for 2 years, I'd get so pissed driving to work (1 hour) just thinking about how much I hated the job, then spend my hour long drive home each night crying!
IT'S NOT WORTH IT!

{{{HUGS}}}