Cleaned up matching rules documentation and added tests to match