Global variables versus dynamic data