Some debugging, but it's on the right track.