Change return code handling to be fully general
Add unbox-strict-fields to compile flags