Small variable fix and app.php cleanup