Clean things up and set default values.