GWT-687: refactored rule generation