changed file system stuff to prepare for iOS app as well