Add a few missing includes and remove a stray debug printf.