Refactor render a bit, massive test cleanup.