Tried to clean up my old disgustingly ugly code

I honestly can't believe this was programmed by me.