Remove threading from main