Moved ObjectResource to its own class