Reformat file to tabs
PEP8 fixes
Update to include metadata merge
Further fixes to metadata merge
Updates to metadata merge test

Just a side note: all tests now pass and I will not accept any pull requests that break existing tests from now on.