Removed DocResource to make the code more generic