Merged view.php into index.php

index.php handles all non-AJAX traffic for the frontend