tweaking db connection
moved config required into functions.php
tweaked a lot of minor stuff