Import of the original source code from codeplex.