Refactored resource module to use state.type.on syntax