I know that this code is BEYOND HORRIBLE. I was very constrained time-wise. Will either improve it myself or gladly accept pull reqs.