example index.php refactored to work with current Application