Better index

Refactor front controller to use the Application.php core class