Consistent leading whitespace, ensuring proper code alignment across machines.
Optimised using statements and shortened qualified references.
Added TODO highlighting possible bug.
Simplified Linq expressions that check types.
Marked fields as 'readonly' where possible.
Removed redundant initialisers.
Removed redundant catch/re-throw.
Removed redundant casts.
Fixed several issues in XML documentation.
Simplify code via Linq expressions.
Use 'as' cast and null check instead of double type checking via 'is' and explicit cast.
Use 'is' type check instead of "a.GetType() == typeof(T)"