Formatting update
Fixed to_num functionality and added fall-back for when input is 0.