Added PowerShell 3.0 related changes. I think this is complete for now.