Added basic support for layers.

Layers don't actually work yet, but they will.