Code organization to make things better.

Moved all entity creation and setup code into the factory module since
it makes most sense to have it in there.