Fixed some bugs and added some functions to identify the filesystem.