Filesystem filled out

Lots of functions added for the filesystem, which required some other
functions to be added too