code cleaning . added $perms and $webDir for configuration