Updated in SharePoint 2010 template

Used the Visual Studio 2010 SharePoint 2010 project template to create
the code.
Modified access to the SPSite object as it was different in 2010.
Marked the item as processed.