FINAL commit

Program now works but uses too many variables, I think. It was done
pretty quickly so I'm not sweating over it.