Refactoring and preparing to implement reroll.