Implemented constructor for Resource class