Trim down generated template