Update app.php

First iteration of the App class.  Ported over the code from the original "front controller" and separated it into the logical functions.