add recursive permission adding/deleting

also other minor fixes