Folder deletion and other bug fixes