Refactored to be better.