Refactoring and prep for new feature.