moved init stuff to init.php, moved inclusion point for config, added error handling