Added interfaces for Resource and ResourceFactory