Apply smart pointers to File and relevant classes