Formatting for PE11,13 and further improvements to PE_main