Add to collection with tests
Refactor resource loading