Change get_bugs, refactor main.py