FIXED ALL THE BUGS. TRUST ME, I'M A PROGRAMMER