Turned directory to an array, program updates directory and saves
updated code for increased array loading functionality