Reworked a ton of crap. Everything works perfectly. Everything needs to be edited with better variable names, cleaner comments, etc.