Added support to delete files. Also added a better rights management