How could you avoid making these globals?