Changed API

Making the jersey code fully encapsulated.