Refactor code from Proj Euler 004.