Fix namespace in index.php. Fix automatic base_url detection.