Add defaults and global variables.