Cleaned fileIO and search