Added basic support for merging + Tests. Couple more changes to credentials work.