Rewrote File classes with smart pointers