wrote fs, added window-closing-button and fixed some small bugs