Heavy refactoring, added alloc, removed create.