lots of changes, but they are mostly making the code adhear more closely to c# standards