Isolate Jersey dependency

I have done a small refactor with the aim of isolate the Jersey dependency.