Turn some initialisation into functions
Turn building core module into a function
Turn dep checking into function
Turn conflict checking into function
Turn check_ready into a function
Turn removal into a function
Turn building into a function
Turn finalizing and tagging and pushing into functions
Split out a function for building a module
Move module stopping into do_finalize
We were just taking highest run order, now do it explicitly
Move testing into its own function
Pass shutit_id_list to all the functions that use it
Add lots of arguments to functions that want them
Main operation now inside a function. No more globals, huzzah.
Consistent argument ordering
to_build is only used in a couple of places
Fix call to run_order_modules
merged aphs-main-functions