Refactor (smaller functions)
Introduce slope and intercept