Factored out creating units.