Remove useless function; globally assign its included variables