Fs refactor and some of the issues fixed.