Refactor to jersey