Do you have a sump? If so, it could be poor surface skimming. Meaning a portion of the surface water is blocked off from getting pulled into the overflow. An oily residue on the surface is a sure sign of this. If your return pump sucked a little air in then foam could accumulate there as well. Usually changing the direction or adding additional surface flow/agitation will correct it. Pics of the foam and a top down shot (of your aquarium, not you) with all pumps running could be helpful.