various improvements to Main bootstrap