Converted over to linq and other 3.5 constructs.