Make code style consistent in template