big refactor

now has a per-file merge function, better structure, formatting
procedure should work, etc.