Refactored rule checking to use less reflection