Stack selection by application-id (configurable), and minor fixes