Fixes to building from source sections

Fixes to building from source sections. Restructure and tidy. Needs more work, but parking this due to being blocked while building from source.