Added loader, consolidated setup to index.php