Save files from editor

I also updated a few codes for tabbed interface