Externalisd command perms and cleaned up code