This is the main script. I've already refactored it a bunch before I made this repo New changes will obviously be stored in git from now on