Moved `app` variable declaration to the top - More understandable