Refactored "create" operations and associated tests.

Some tests fail.