Added field type number, code cleanup