Wrote better equality testing function, hit 1000 lines of code :)