I tried to follow the instructions from the project and my first change was kinda small but I feel it got better. I hope this entire thing get inside something like Exercism soon, it can be good to have actual feedback for this.
And without further ado here is the code I changed, first how I found the code and the following is how the code looks now.
What I did was just to remove the constant magic numbers and put it in it’s own method is a very simple refactor, but I think this is the way to go doing refactoring in small chunks. I will try to keep improving this code without using any code smell tool, just to see where my intuition takes me.