Add a declarative layer
Update readme, add tests