Refactored the numberinput directive