Update MainApp.java

Added a short explanation of the application's logic.