Added method references to IPattern
Added Result.newCopy method
Updated query grammar
Rewriting ResolutionEngine.direction