Added formatting options to number field.

Tests fail at TreeTypeTest (gonna fix it in other PR).