Big change

Changed all the files. Added main loop to master.py