Enhance application server. Add basic template support for appstack.