Refactor resources

Simplify resources handling
Should 'new Capacity()' be '{}'?