Added more comprehensive return values.