Fixed file permissions
Added missing type hinting in some parameters