[pergola] cleaning code and some comments