Layers now fetched by id in Layer heap. Fixes #40.