Refactored terrible class.