Revert "Revert "Leftovers from previous commit""

This reverts commit 5e61db5ac8bea765e0bda65a1867ac84212f247a.