Really crufty cleanup... I'll do this better, I promise!