It took me a 4,5 hours to do it and the code for it is killing the poor kids down the street.It is very messy so ill need to clean it up a little.
Here are the screen shots of the terrain :
And here is the code that fixes the edges :
code
I'll upload an executable to my space so that everyone can play with it :)