Further tidied allmain.c