Refactor build_resource
Merge pull request #2 from miquelbarba/refactor_resource

Refactor build_resource