How to refactor 31,000 lines of bad code | Hacker News Reader