move n-layer input reads to the end
move n-layer input reads to the end

The source code looks neater, and the logic is easier to follow if these happen in a block at the end.

edoddridge/MIM,edoddridge/aronnax