Serialize decimal fields as number and changes the type of all 'code' fields to string

closes #73