added scoring and general improvements in main.py