Folder support, bug fixes