added support for create, some refactorings