Merged tribler.py changes into tribler_main