Previous refactor was bleh. New refactor.