Initialize some variables to prevent notices

These things weren't always set, and generated notices.