Moved some vars to where they would actually get values.