add recursive permission adding/removing

also other minor fixes