Added comments for MainApp code