Proper codes