combined and refactored resource repo handler and sparql handler