Cleaned up data storage to keep it in the object rather than in the DOM.