Fixed bug which caused us to ram into the rate limit like a brick wall. Also changed some variable names to better match Python convention.