Numerous fixes and enhancements in application manifest generation and processing