Factored details out to the top of the file.