fixed permissions

added a few new config/data files
fixed a bunch of bit-rot issues

added Rana's function