Updated some more depreciated functions, and some file encodings.