refactory application support for stack template