Define class Resource
Add extra to assemble
Add ResourceMapping
Move to library/
Move tests to tests/