Refactored to use ratelimiter module, clarify names, and formatting