1. Improve the use of data structures 2. Extract common methods 3. Avoid expensive operations
GitHub Pull Request #2053