Adding unit tests, refactoring the manifest merging, and adding merging function
Reordering the merging manifests functions to follow: base, new, output