Added IntelliJ IDEA to ignore.
Added useful query methods for filtering based on references.