Preheat the oven to 200c.
Melt the butter in a microwave or small saucepan over medium heat. Brush a little on all the sides of the baking tin/dish you will be using. Reserve the rest.
Cut the dough into six pieces. Keep the other pieces covered with plastic wrap when you are not rolling them, to stop them drying out.
Keeping everything well floured - this dough is quite wet, so can take more flour than you would typically use for rolling out filo - run a piece through the pasta machine on the first setting. Work your way through the settings, sprinkling more flour as necessary, until you reach 6 or 7, or you feel the dough is too delicate to continue rolling. You will probably need to cut the sheet in half once you reach setting 4 or 5, so it is a more manageable length. Lay the waiting half on a lightly floured surface while you work with the other half. Be careful when using whole wheat that there aren't any large kernels in the mix or pieces of very dry dough stuck to the rollers, as they can cause your pastry to tear as it runs through the machine - very frustrating!
When it is rolled as thinly as possible, arrange the piece inside the buttered baking tin/dish, trimming with scissors as necessary. Once you have a full layer, brush the whole lot with butter. Continue working until you have three or four layers, depending on how thick you want the pastry, brushing with butter between each layer. It really doesn't matter if your pieces tear, overlap or look uneven - they will still bake beautifully.
Add the filling, then repeat the dough rolling technique for the top, adding another three to four layers, remembering to brush with butter after each layer. Tidy up the edges by poking any excess down the sides of the tin/dish.