[WIP] Adjust to new resource management

Change-Id: Ieaaf6fa166d13c7cd0177ec381b4e74e2923c2ce