Refactors so that multiple sources can be added.