Small fixes in ASTVisitor and added dereference capability to repository