Added generic implementation of EC2 and specialized classes for source localization