fixed error in rules2tuple
errors in prevclasses as list
fixed match_at which was missing support for multiple prev classes
added pre-sorted edges
added sortededges