Bug fixes and better use of Jersey