User permissions and a few improvements