did some internal commenting
renamed a few things