Refactor ValidNumber
Add 3 new problems.