a whole lot of junk

a lot of copied code that i need to make sense of and un-plagiarise D: