Time for my semi-random code cleanup commit.

Just lots of general code quality and cleanup, fixed a few derps, added comments for future development (or where I wasnt sure)