Clean up init in main programs

Some first steps towards cleaning up the source of our different "main" functions.