There is a lot of stuff moved around in this file. Some of the diffs aren't clear, sorry. The intention is to organise this file into compile, test and analyse blocks so far as possible.