Added main.py and rules.py