try a three gallon bucket. you can get them new at paint stores or a hardware store. youll need the lid too.
basically a hole is cut into the side of the bucket at the bottom. a hose is run out from the bucket for the return to the pond. bio-balls are placed in the bucket to within a few inches of the top. a sheet of floss is cut to just a lit bigger around than the bucket and placed snugly over the bio-balls. a hole is cut into the lid thats just big enough to run another into it. just inside of the lid, a sprayer or diffuser of sorts is needed to cast the incoming, dirty water as evenly of the floss as you can. the hose coming out of the lid comes in from the pond/powerhead.
can you picture what im saying?

sorry if i reapeated myself, im just trying to make it as clear as possible.
its a rather simple and cheap way to make a filter. although, there are powerheads available with pre-filtering capabilities. if you were to get one of those, you could skip the floss in the bucket.
hereyou go, i drew out a diagram for you of what im talking about. in hindsight, since its only a 40 gallon pond, you could get away with using a 1-3 gallon bucket full of bioballs and floss.
hope this helps!