Refactored regenerator runtime to conform it to the Proto language.