Added factories to be shared with app; Don't perform contract query if no contract names to check