Redone Practically Everything.

I’ve update much of the source code. If I have not reflected your
commits yet, then perhaps leaving comments in my source code would be
helpful (I tried to update it with all commits so far, but I may have
missed a couple).