Fixed deprecation errors
Refactoring of Filesystem