Refactor Partial to use Resource class.