Use return code constants instead of integer