Refactored to include data in a Global object.