Rewrote file classes to use smart pointers