Refactoring and prep for throttling