Cleaned the file loading functions (not all)