clean up cfg code for Stage1 emulator