Refactor Application.php to have a run() method.
Improve path handling.