Refactoring some poor design choices.