Fixed problem with non existing variable $db and removed not used variab...

...le $conf