Moved code from master.cfg to master.py