Use only immutable objects.
Simplify layout.js