Refactored (again).