Made changes to have all required information available when using multiple sources (joins). Refactored building the result set a bit to avoid creating a mess