Comment and documentation of core.py
Comment and documentation of dialog.py