Changed the data structure of the sources into a class instead of using hash maps.