Rewrote File classes using the smart pointers