Made some huge documentation changes and renamed a few variables.