more cleanup and permissions