(refactor) Less deep nesting.