Refactoring to use resin