Good idea, done. I've left out the debug lines for now.