Rewrote File, FileRef and FileStream to use smart pointers