Report template code refractoring