Move MatchRule detection
It currently reads it for every separate part, it only needs to happen once with the source input
Merge pull request #64 from Dykam/master

Move MatchRule detection