More cleanup

This includes the stuff from the `std_layout` branch as it builds on that.