Fixed several bugs and implemented create command.