Added setperms and standardised permissions