Added class for DB and moved code from config to bootstrap.php