Refactor, cleanup.