Added da_append function.
Fixed several bugs.