Added some data management stuff to handle different data sources