Clean-up permissions and tables