Refactor into a simpler class.