speed optimizations

- prioritize quickly dismissed rules
- prioritize rules starting with a token (part of above)
- re-use rules
- use optional