Refactored, redone.