Refactored resource prepare objects
Merge pull request #1015 from shenrie/master

Refactored resource prepare objects