Clean up layer diff for clarity
Structured diff implementation, first draft
At least it runs?