Bug fixing, writing unit tests since this will be used quiet a bit (Looking ahead at Proj Euler tasks).