Merge pull request #1 from esben/master

Adapt to changed layer API