FIX: Refactor resource and value assignment