Added ExtensionMethods.cs and fixed some minor stuff