Refactored Ext.cs