Refactored the number.js