Define constants and return codes