Add nl macro
Fix it so it works with multiple qualified rules

Well, shit. This was one of the most difficult commits I've ever made.