Feature/merge auto

Implements feature #26, intelligent merge with option.