Merge pull request #20 from chuckdumont/master

LayerImpl refactoring/simplification and more unit tests