red-brick/npw: Fix error message for define error
red-brick/npw: Remove local session variable
red-brick/npw: Start using constants for field names