Refactored to new kappa/filesystem