Fixed Resource and Survey Services

Refactored the ResourceService to be much smaller, and fixed small issues in the survey service.