Added an effects query for extracting symbols from expressions. Refactored dependencies to use this query.