Moved config, extracted some stuff from index.php