A lot of the code from here is (embarassingly,) from w3schools.
I do not know what else to write for now.