Refactored to use new extension methods
Fixed obsolete references
Merge pull request #313 from erwinvanhunen/FixedObsoleteReferences

Refactored to use updated extension methods