Slightly improved MyApp and SmartApp templates