Final version for now. New return codes.