you should ring 0800 83 62 62 for free advice
But basically my advice is to deal with the issue of the tenancy separately, what was your agreement, document what they owe you, photograph the mess and document it, make sure you document and photograph the damage as well, then send him a letter asking for the money, and apply to the tribunal for rent owing and damages
If you were down stairs and had a verbal agreement to be there - then that's a separate issue, and he still had no right to vacate without giving notice, and no right to leave the place in a mess.
But you say he's taking you to court? did he ask you to leave?
Bookmarks