Improve the kernel life cycle and reuse the PortalContainer.getInstance() API