Rules applied as a for loop.
Refactor done by Enrique, moving the loop to where the problem was.
Created Object Oriented solution with Enrique and public (class).