Move extend to external file