Length does make a difference, but so does your beer line- are you running 3/16? Bigger isn't always better- do a search on line balancing; there is a chart and a formula for proper line length/diameter. rule of thumb, 8-10 ft of 3/16 is fairly common.
Ball/Pin lock connectors (for gunk/leaks)
Warm lines (a lot of times first 1/2-1 pour is foamy do to sitting in the line, warming up, and CO2 coming out of solution; ideally math works out to a couple ounces; pour one right after. If it isn't foamy/has correct head, look at how to cool your lines).
PS there are TONS of FOAM posts... do a search to see what worked for others