Replace some jersey dependent code