Small refactor
Revert "Small refactor"

This reverts commit 17b1680df3fc0347536a7c8a2cb2f7f0a9f3a34a.
Revert "Revert "Small refactor""

This reverts commit 4572c244a479834080eefabc5c5e217ab95587d1.