Refactor using the thread-first macro.