Rename kernel.model to kernel.resource.
Refactor model.
Add resource compiler.