Refactored setSuccessLayout and setErrorLayout to use _setSpecificLayout