Still should be factored out.