Permissions

Permission handling and better type defaults.