Create codes
Set code fields